"""if like <= 5 and like >= 0:
    for i in self.dishList:
        # i == {"香辣肉丝":{"价格":13,"库存":999}}
        # i == {"锅包肉":{"价格":15,"库存":999}}
        # i == {"麻辣香锅":{"价格":5,"库存":999}}
        if list(i.keys())[0] == Dish:
            # i.keys() == dict_keys(['香辣肉丝'])
            # list(dict_keys(['香辣肉丝']))[0]  == ['香辣肉丝'][0]
            # 香辣肉丝
            if i[Dish]['库存'] > 0:
                i[Dish]['库存'] -= 1
                i[Dish]['点赞'].append(like)
            else:
                print("糟糕，您来晚了，菜已经售罄了！")
else:
    print("点赞分数过高！请控制在0~5分！")"""
dictDishList = [{"香辣肉丝":{"价格":15,"库存":999,"点赞":[]}},{"锅包肉":{"价格":13,"库存":999,"点赞":[]}},{"麻辣香锅":{"价格":12,"库存":999,"点赞":[]}}]
dish = "香辣肉丝"
for i in dictDishList:
    # print(i)
    """
    {'香辣肉丝': {'价格': 15, '库存': 999, '点赞': []}}
    {'锅包肉': {'价格': 13, '库存': 999, '点赞': []}}
    {'麻辣香锅': {'价格': 12, '库存': 999, '点赞': []}}
    """
    # print(i.keys())
    """
    dict_keys(['香辣肉丝'])
    dict_keys(['锅包肉'])
    dict_keys(['麻辣香锅'])
    """
    # print(list(i.keys()))
    """
    ['香辣肉丝']
    ['锅包肉']
    ['麻辣香锅']
    """
    # print(list(i.keys())[0])
    """
    香辣肉丝
    锅包肉
    麻辣香锅
    """
    print(list(i.keys())[0])
    # if dish == list(i.keys())[0]:
    #     print(list(i.keys())[0])



